package com.atguigu.gulimail.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/*
*1.整合mybatis-plus
*    1导入依赖<dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.2.0</version>
        </dependency>
*    2 配置
*           1配置数据源
*               1导入数据库的mysql驱动依赖
*               2在配置文件application.yml,配置数据源地相关信息
*           2配置mybatis-plus:
*               1在springboot上面使用@MapperSacn注解配置dao接口地包扫描路径
*               2告诉mybatis-plus地映射文件sql位置
*
* 1mybatis-plus逻辑删除
*  1)在配置文件中配置逻辑删除标记
*  2)配置逻辑删除组件的bean(3.1版本以及该版本一下配置，)
*  3)实体类中逻辑删除字段进行添加逻辑删除注解@TableLogic 这里使用showStatus作为逻辑删除的字段
*  4)
* */
@MapperScan("com.atguigu.gulimail.product.dao")
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.atguigu.gulimail.product.feign")
public class GulimailProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimailProductApplication.class, args);
    }

}
